﻿using DocumentFormat.OpenXml.Lite.Core.Shared;
using DocumentFormat.OpenXml.Lite.Xml;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Schema;
using System.Xml.Serialization;

namespace DocumentFormat.OpenXml.Lite.Core.Office.VariantTypes
{
    [XmlRoot("blob", Namespace = "http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes")]
    public class BinaryBlob : SimpleElement<Base64Binary>, IVariantType
    {
        public BinaryBlob() { }
    }

    [XmlRoot("bool", Namespace = "http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes")]
    public class Bool : SimpleElement<bool>, IArrayType, IVariantType, IVectorType
    {
        public Bool() { }
    }

    [XmlRoot("bstr", Namespace = "http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes")]
    public class BasicString : SimpleElement<string>, IArrayType, IVariantType, IVectorType
    {
        public BasicString() { }
    }

    [XmlRoot("cf", Namespace = "http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes")]
    public class ClipboadrData : SimpleElement<Base64Binary>, IVariantType, IVectorType
    {
        [Optional]
        [XmlAttribute("format", Form = XmlSchemaForm.Qualified)]
        public string Format { get; set; }

        public ClipboadrData() { }
    }

    [XmlRoot("clsid", Namespace = "http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes")]
    public class ClassId : SimpleElement<string>, IVariantType, IVectorType
    {
        public ClassId() { }
    }

    [XmlRoot("cy", Namespace = "http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes")]
    public class Currency : SimpleElement<string>, IArrayType, IVariantType, IVectorType
    {
        public Currency() { }
    }

    [XmlRoot("date", Namespace = "http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes")]
    public class Date : SimpleElement<DateTime>, IArrayType, IVariantType, IVectorType
    {
        public Date() { }
    }

    [XmlRoot("decimal", Namespace = "http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes")]
    public class Decimal : SimpleElement<decimal>, IArrayType, IVariantType
    {
        public Decimal() { }
    }

    [XmlRoot("empty", Namespace = "http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes")]
    public class Empty : XmlSerializable, IVariantType
    {
        public Empty() { }
    }

    [XmlRoot("error", Namespace = "http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes")]
    public class Error : SimpleElement<string>, IArrayType, IVariantType, IVectorType
    {
        public Error() { }
    }

    [XmlRoot("filetime", Namespace = "http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes")]
    public class Filetime : SimpleElement<DateTime>, IVariantType, IVectorType
    {
        public Filetime() { }
    }

    [XmlRoot("i1", Namespace = "http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes")]
    public class Integer1 : SimpleElement<sbyte>, IArrayType, IVariantType, IVectorType
    {
        public Integer1() { }
    }

    [XmlRoot("i2", Namespace = "http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes")]
    public class Integer2 : SimpleElement<short>, IArrayType, IVariantType, IVectorType
    {
        public Integer2() { }
    }

    [XmlRoot("i4", Namespace = "http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes")]
    public class Integer4 : SimpleElement<int>, IArrayType, IVariantType, IVectorType
    {
        public Integer4() { }
    }

    [XmlRoot("i8", Namespace = "http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes")]
    public class Integer8 : SimpleElement<long>, IArrayType, IVariantType, IVectorType
    {
        public Integer8() { }
    }

    [XmlRoot("int", Namespace = "http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes")]
    public class Integer : SimpleElement<int>, IArrayType, IVariantType
    {
        public Integer() { }
    }

    [XmlRoot("lpstr", Namespace = "http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes")]
    public class LPSTR : SimpleElement<string>, IVariantType, IVectorType
    {
        public LPSTR() { }
    }

    [XmlRoot("lpwstr", Namespace = "http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes")]
    public class LPWSTR : SimpleElement<string>, IVariantType, IVectorType
    {
        public LPWSTR() { }
    }

    [XmlRoot("null", Namespace = "http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes")]
    public class Null : XmlSerializable, IVariantType
    {
        public Null() { }
    }

    [XmlRoot("oblob", Namespace = "http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes")]
    public class BinaryBlobObject : SimpleElement<Base64Binary>, IVariantType
    {
        public BinaryBlobObject() { }
    }

    [XmlRoot("ostorage", Namespace = "http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes")]
    public class BinaryStorageObject : SimpleElement<Base64Binary>, IVariantType
    {
        public BinaryStorageObject() { }
    }

    [XmlRoot("ostream", Namespace = "http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes")]
    public class BinaryStreamObject : SimpleElement<Base64Binary>, IVariantType
    {
        public BinaryStreamObject() { }
    }

    [XmlRoot("r4", Namespace = "http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes")]
    public class Real4 : SimpleElement<float>, IArrayType, IVariantType, IVectorType
    {
        public Real4() { }
    }

    [XmlRoot("r8", Namespace = "http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes")]
    public class Real8 : SimpleElement<double>, IArrayType, IVariantType, IVectorType
    {
        public Real8() { }
    }

    [XmlRoot("storage", Namespace = "http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes")]
    public class Storage : SimpleElement<Base64Binary>, IVariantType
    {
        public Storage() { }
    }

    [XmlRoot("stream", Namespace = "http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes")]
    public class Stream : SimpleElement<Base64Binary>, IVariantType
    {
        public Stream() { }
    }

    [XmlRoot("u1", Namespace = "http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes")]
    public class UnsignedInteger1 : SimpleElement<byte>, IArrayType, IVariantType, IVectorType
    {
        public UnsignedInteger1() { }
    }

    [XmlRoot("u2", Namespace = "http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes")]
    public class UnsignedInteger2 : SimpleElement<ushort>, IArrayType, IVariantType, IVectorType
    {
        public UnsignedInteger2() { }
    }

    [XmlRoot("u4", Namespace = "http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes")]
    public class UnsignedInteger4 : SimpleElement<uint>, IArrayType, IVariantType, IVectorType
    {
        public UnsignedInteger4() { }
    }

    [XmlRoot("u8", Namespace = "http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes")]
    public class UnsignedInteger8 : SimpleElement<ulong>, IArrayType, IVariantType, IVectorType
    {
        public UnsignedInteger8() { }
    }

    [XmlRoot("uint", Namespace = "http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes")]
    public class UnsignedInteger : SimpleElement<uint>, IArrayType, IVariantType
    {
        public UnsignedInteger() { }
    }

    [XmlRoot("vstream", Namespace = "http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes")]
    public class BinaryVersionedStream : SimpleElement<Base64Binary>, IVariantType
    {
        [Optional]
        [XmlAttribute("version", Form = XmlSchemaForm.Qualified)]
        public string Version { get; set; }

        public BinaryVersionedStream() { }
    }
}
